package com.example.rabc.exception;

import lombok.Getter;

/**
 * 业务异常类
 */
public class BusinessException extends RuntimeException {
    @Getter
    private int code = 500;
    private String message;
    
    public BusinessException(String message) {
        super(message);
        this.message = message;
    }
    
    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }
}